import request from '@/utils/request'
const baseUrl = '/eduservice/video'
export default {
    /**
     * 根据id删除实体信息
     * @returns 
     */
    deleteEntityById(courseId) {
        return request({
            url: baseUrl + `/deleteEntityById/${courseId}`,
            method: 'delete',
        })
    },

    /**
     * 根据id获取章节信息
     * @returns 
     */
    getVideoInfo(videoId) {
        return request({
            url: baseUrl + `/getVideoInfo/${videoId}`,
            method: 'get',
        })
    },
    /**
     * 保存章节信息
     * @returns 
     */
    saveEntity(video) {
        return request({
            url: baseUrl + `/saveEntity`,
            method: 'post',
            data: { ...video }
        })
    },
    /**
     * 修改章节信息
     * @returns 
     */
    updateEntity(video) {
        return request({
            url: baseUrl + `/updateEntity`,
            method: 'put',
            data: { ...video }
        })
    },
}